﻿using Prism.Mvvm;
using System.Collections.ObjectModel;
using WpfApp1.Models;

namespace WpfApp1.ViewModels
{
    public class MainWindowViewModel : BindableBase
    {
        public ObservableCollection<SharpBase> Items { get; set; } = new ObservableCollection<SharpBase>();

        public ObservableCollection<SharpBase> Toolitems { get; set; } = new ObservableCollection<SharpBase>();

        private SharpBase _selectedToolItem = null;
        public SharpBase SelectedToolItem { get => _selectedToolItem; set => SetProperty(ref _selectedToolItem, value); }

        public MainWindowViewModel()
        {
            Items.Add(new RectangleBase() { Left = 0, Top = 0, Width = 100, Height = 100 });
            Items.Add(new EllipseBase() { Left = 100, Top = 100, Width = 100, Height = 100 });
            Items.Add(new LineBase() { Left = 200, Top = 200, Width = 100, Height = 100 });

            Toolitems.Add(new RectangleBaseToolItem() { Width = 20, Height = 20 });
            Toolitems.Add(new EllipseBaseToolItem() { Width = 20, Height = 20 });
            Toolitems.Add(new LineBaseToolItem() { Width = 20, Height = 20 });
            Toolitems.Add(new DrawingBaseToolItem() { Width = 20, Height = 20 });
        }
    }
}
